//
//  MKStatuesUser.m
//  Weibo_OC
//
//  Created by mac on 16/1/17.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "MKStatuesUser.h"

@implementation MKStatuesUser
//用户认证类型 只读
- (UIImage *)verified_type_image {
    switch (self.verified_type) {
        case 0:
            return [UIImage imageNamed:@"avatar_vip"];
            break;
            case 2:
            case 3:
        case 5:return [UIImage imageNamed:@"avatar_enterprise_vip"];
            break;
        case 220: return [UIImage imageNamed:@"avatar_grassroot"];
        default:
            return  nil;
            break;
    }
}

//会员等级图片  只读
- (UIImage *)mbrankImage {
    if (self.mbrank > 0 && self.mbrank < 7) {
        NSString *imageName = [NSString stringWithFormat:@"common_icon_membership_level%d",self.mbrank];
        return [UIImage imageNamed:imageName];
    }
    return  nil;
}

//用户头像  只读
- (NSURL *)profile_imageURL {

    return  [NSURL URLWithString:self.profile_image_url];
}


- (instancetype)initWithDict:(NSDictionary *)dict {
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    
    return  self;
}

- (NSString *)description {
    return  [NSString stringWithFormat:@"%@,%d",self.screen_name,self.mbrank];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {}

@end
